package com.ibeetl.admin.console.web.query.business;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.util.enums.CoreDictType;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

public class ShareDetailsQuery extends PageParam {

	@Query(name="分享者Id",display=true)
	private String openid;
	
	@Query(name="分享者昵称",display=true,fuzzy=true)
	private String nickname;
	@Query(name="被分享者Id",display=true)
	private String beOpenid;

	@Query(name="被分享昵称",display=true,fuzzy=true)
	private String beNickname;
	//记录时间
	@Query(name="记录时间",display=true,type=Query.TYPE_DATE_BETWEEN)
	private String createTimeRange;
	private Date createTimeMin;
	private Date createTimeMax;

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getBeOpenid() {
		return beOpenid;
	}

	public void setBeOpenid(String beOpenid) {
		this.beOpenid = beOpenid;
	}

	public String getBeNickname() {
		return beNickname;
	}

	public void setBeNickname(String beNickname) {
		this.beNickname = beNickname;
	}

	public String getCreateTimeRange() {
		return createTimeRange;
	}

	public void setCreateTimeRange(String createTimeRange) {

		this.createTimeRange = createTimeRange;
		if(StringUtils.isEmpty(createTimeRange)) {
			return ;
		}
		Date[] ds = Tool.parseDataRange(createTimeRange);
		this.createTimeMin=ds[0];
		this.createTimeMax =ds[1];
	}

	public Date getCreateTimeMin() {
		return createTimeMin;
	}

	public void setCreateTimeMin(Date createTimeMin) {
		this.createTimeMin = createTimeMin;
	}

	public Date getCreateTimeMax() {
		return createTimeMax;
	}

	public void setCreateTimeMax(Date createTimeMax) {
		this.createTimeMax = createTimeMax;
	}
}
